import request from "../utils/request";

export const listReviewsByUserId = (query) => request.get('/api/review/listReviewsByUserId', { params: query});
export const deleteReviewById = (reviewId) => request.get('/api/review/deleteById', { params: { reviewId } });

export const getReviewByStoreId = (storeId) => request.get('/api/review/getReviewByStoreId', { params: { storeId } });

export const getChildReviewByParentId = (parentId) => request.get('/api/review/getChildReviewByParentId', { params: { parentId } });

export const insertChildReview = (review) => request.post('/api/review/insertChildReview', review);

export const insertParentReview = (review) => request.post('/api/review/insertParentReview', review);

export const getCurUserReviewsById = (userId) =>request.get('/api/review/getCurUserReviewsById', { params: { userId }})